﻿namespace RaisingStudio.SmallProgram.Library
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.CompilerServices;
    using System.Threading;

    [SmallProgramType]
    public static class Controls
    {
        private static Primitive _lastClickedButton;
        public static Primitive LastClickedButton
        {
            get
            {
                return _lastClickedButton;
            }
        }


        private static SmallProgramCallback _buttonClicked;
        public static event SmallProgramCallback ButtonClicked
        {
            add
            {
                _buttonClicked = null;
                _buttonClicked += value;
            }
            remove
            {
                _buttonClicked -= value;
            }
        }
        private static void OnButtonClicked(object sender, EventArgs e)
        {
            // TODO:
        }

        private static Primitive _lastTypedTextBox;
        public static Primitive LastTypedTextBox
        {
            get
            {
                return _lastTypedTextBox;
            }
        }

        private static SmallProgramCallback _textTyped;
        public static event SmallProgramCallback TextTyped
        {
            add
            {
                _textTyped = null;
                _textTyped += value;
            }
            remove
            {
                _textTyped -= value;
            }
        }
        private static void OnTextChanged(object sender, EventArgs e)
        {
            // TODO:
        }


        public static Primitive AddButton(Primitive caption, Primitive left, Primitive top)
        {
            // TODO:
            return null;
        }

        public static Primitive AddMultiLineTextBox(Primitive left, Primitive top)
        {
            // TODO:
            return null;
        }

        public static Primitive AddTextBox(Primitive left, Primitive top)
        {
            // TODO:
            return null;
        }

        public static Primitive GetButtonCaption(Primitive buttonName)
        {
            // TODO:
            return null;
        }

        public static Primitive GetTextBoxText(Primitive textBoxName)
        {
            // TODO:
            return null;
        }

        public static void HideControl(Primitive controlName)
        {
            // TODO:
        }

        public static void ShowControl(Primitive controlName)
        {
            // TODO:
        }

        public static void Move(Primitive control, Primitive x, Primitive y)
        {
            // TODO:
        }


        public static void Remove(Primitive controlName)
        {
            // TODO:
        }

        public static void SetButtonCaption(Primitive buttonName, Primitive caption)
        {
            // TODO:
        }

        public static void SetSize(Primitive control, Primitive width, Primitive height)
        {
            // TODO:
        }

        public static void SetTextBoxText(Primitive textBoxName, Primitive text)
        {
            // TODO:
        }
    }
}

